#include<stdio.h>
int main()
{
    long int i;
    long int bonus1,bonus2,bonus3,bonus4,bonus5,bonus;
    printf("please input prifit:");
    scanf("%ld",&i);
    bonus1=100000*0.1;
    bonus2=bonus1+100000*0.075;
    bonus3=bonus2+200000*0.05;
    bonus4=bonus3+200000*0.03;
    bonus5=bonus4+400000*0.015;
    if(i<=100000)
    bonus=i*0.1;
    else if(i>100000&&i<=200000)
    bonus=bonus1+(i-100000)*0.075;
    else if(i>200000&&i<=400000)
    bonus=bonus2+(i-200000)*0.05;
    else if(i>400000&&i<=600000)
    bonus=bonus3+(i-400000)*0.03;
    else if(i>600000&&i<=1000000)
    bonus=bonus4+(i-600000)*0.015;
    else if(i>1000000)
    bonus=bonus5+(i-1000000)*0.01;
    printf("bonus=%ld",bonus);
}